<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html >
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>督办工作详情</title>
<link rel="stylesheet" type="text/css"
	href="jsPlugin/semantic/semantic.min.css">
<link rel="stylesheet" type="text/css"
	href="jsPlugin/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="css/login.jsp.css">
<script src="js/jquery.js"></script>
<script src="jsPlugin/semantic/semantic.min.js"></script>
<script src="jsPlugin/layui/layui.js"></script>
<!-- <script src="jsPlugin/jqprint/jQuery.print.js"></script> -->
<style type="text/css">
</style>
</head>
<body>
	<jsp:include page="header.jsp"></jsp:include>

	<div class="ui container" style="background: #fff !important; min-height: 500px">

		<div class="ui segment " style="background: #fff !important;border-right-color: #fff;border-left-color: #fff;">
			<fieldset class="layui-elem-field layui-field-title">
				<legend style="color: black;">
					<i class="layui-icon" style="font-size: 20px; color: #009688;">&#xe60a;</i>工作详情
				</legend>
				<button class="layui-btn layui-btn-normal"
					onclick="window.location.href='<%=basePath%>goSupervises#!${tab}=${curl}'" style="float: right;">
					 返回列表
				</button>
			</fieldset>
			<div class="ui  segments" style="width: 100%;">
				<div class="ui horizontal segments" style="height: 16em; width: 100%; color: black;border-left-color: #fff;border-right-color: #fff;border-top-color: #fff;">
					<div class="ui basic segment" style="width: 70%;float:left; color: black;border-bottom-color: #fff; border-left-color: #fff;border-top-color: #fff;">
						<h2 align="center" class="ui center aligned icon header" style="text-align: center;background:#fff;width:100%;border-color: #fff;color:black !important;">${obj.info_title}</h2>
						<br> 
						<div class="description" style="border-left-color: #fff;">
							<pre>${obj.info_con}</pre>
						</div>
					</div>
					<div class="ui basic segment" style="width: 25%;height:100%; float:left; color: black;border-top-color: #fff; border-bottom-color: #fff;border-right-color: #fff;">
						<p id="type">文件类型：${obj.info_type }</p>
						<p id="rec_org_id">${obj.rec_organiz_id}</p>
						<p>来文原号：${obj.rec_sno }</p>
						<p>批示文件编号：${obj.info_sno }</p>
						<p>创建人： ${obj.cuser_name}</p>
						<p>
							创建时间：
							<fmt:formatDate value="${obj.cdate }" pattern="yyyy-MM-dd HH:mm" />
						</p>
						<div class="ui basic segment" id="image_segment" style=" width: 98%; border-top-color: #fff;border-bottom-color: #fff;border-right-color: #fff;">
							<p>批示件扫描</p>
							<div class="image" id="layer-photos-demo" style=" width: 100%;">
								<c:if
									test="${ obj.info_img_url != null && obj.info_img_url !=''}">
									<c:forEach items="${fn:split(obj.info_img_url,',')}" var="addr"
										begin="0" end="${fn:length(fn:split(obj.info_img_url,','))}"
										varStatus="stat">
										<img src="<%=basePath%>${ addr}"
											style="height: 2em; cursor: pointer;" title="点击查看大图"
											alt="批示件扫描">
									</c:forEach>
								</c:if>
							</div>
						</div>
					</div>
				</div>
				<div class="ui  segment" style="border-color: #fff; margin-left: 1px;"> 
					<blockquote class="layui-elem-quote " id="require1"></blockquote>
					<blockquote class="layui-elem-quote " id="require2"></blockquote>
				</div>
			</div>

			<div id="list">
				<c:if test="${obj.isfinish != 2 }">
				<c:if test="${fn:indexOf(obj.require_organiz_id, organizidflage) > -1 }">
				<c:if test="${obj.progress_status != 'HANDLE_STATIUS_02' }">
				
				<button class="layui-btn layui-btn-normal"
					style="float: right;"
					data="${obj.progress_id } " onclick="_onProgress(this)">
					<i class="layui-icon" style="font-size: 2em; cursor:pointer;">&#xe60a;</i>
					更新工作进展
				</button>
				</c:if>
				</c:if>
				</c:if>
				<table class="layui-table">
					<caption style=" font-size: 1.3em;line-height: 3em;">
						<strong>各部门办理详情</strong>
					</caption>
					<thead>
						<tr>
							<th>办理部门</th>
							<th>办理进度(日期)</th>
							<th width="30%">办理情况</th>
							<th>上报材料</th>
							<th>审批状态</th>
							<th>审批部门/(日期)</th>
							<th class="no-print">操作</th>
						</tr>
					</thead>

					<tbody>

					</tbody>
				<!-- 	<tfoot>
						<tr>
							<th colspan="7">
								<div id="biuuu_city_list"></div>
							</th>
						</tr>
					</tfoot> -->

				</table>
			</div>
		</div>

		<input type="hidden" id="t_end_time" value="${obj.cdate}"> <input
			type="hidden" id="t_info_type" value="${obj.info_type}"> <input
			type="hidden" id="t_str" value="${str1}"> <input
			type="hidden" id="t_limit" value="${obj.require_finish_limit}">
		<input type="hidden" id="t_info_img_url" value="${obj.info_img_url}">
		<input type="hidden" id="t_progress_id" value="${obj.progress_id}">
		<input type="hidden" id="t_userflag" value="${flag}"> <input
			type="hidden" id="t_supervise_info_con"
			value="${obj.supervise_info_con}"> <input type="hidden"
			id="t_supervise_isfinish" value="${obj.isfinish}"> <input
			type="hidden" id="t_curr_user_organizid" value="${organizid}">

	</div>

	<script>
	
	
	function _onProgress(dom) {
	    var id = $(dom).attr('data');
	    layui.use("layer", function() {
	        var layer = layui.layer;
	        layer.open({
	            title: '更新工作进展',
	            area: ['550px', '480px'],
	            skin: 'layui-layer-lan',
	            type: 2,
	            content: ['goaddProgress', 'yes'],
	            success: function(layero, index) {},
	            btn: ['提交', '取消'],
	            yes: function(index, layero) {
	                var body = layer.getChildFrame('body', index);

	                var complete = body.find('form  #complete').val();
	                var con = body.find('form  #con').val();
	                var type = body.find('form  #type').val();
	                var url = body.find('form  #info_file').val();
	                var img = body.find('form  #info_img').val();


	                if (complete && con && type) {
	                	 layer.close(index);
	                    $.getJSON("supervise/progress/info/add", {
	                        complete: complete,
	                        con: con,
	                        type: type,
	                        url: url,
	                        img: img,
	                        id: id
	                    }, function(data) {
	                        var icon = 5;
	                        if (data.isSuccess) {
	                        	var abc = layer.load(0, { time: 10 * 1000 });
	                            loaddata(abc);
	                            loaddata01(abc);
	                            loaddata02(abc);
	                            icon = 6
	                        }
	                        layer.msg(data.msg, {
	                            icon: icon,
	                            anim: 6
	                        });

	                    });
	                } else {

	                    layer.msg('表单不完整请重新输入！', {
	                        icon: 5,
	                        anim: 6
	                    });
	                    var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
	                    iframeWin.vdform();
	                }

	            },
	            btn2: function(index, layero) {
	                layer.closeAll();
	            }
	        });
	    });
	}
		var endtime = '${obj.cdate}';
		var info_type = '${obj.info_type}';
		var str = '${str1}';
		var limit = '${obj.require_finish_limit}';
		var info_img_url = '${obj.info_img_url}';
		var progress_id = "${obj.progress_id}";
		var userflag = "${flag}";
		var supervise_info_con = "${obj.supervise_info_con}";
		var supervise_isfinish = "${obj.isfinish}";
		var curr_user_organizid = "${organizid}"

		var browser = navigator.appName
		var b_version = navigator.appVersion
		var version = b_version.split(";");
		var trim_Version = version[1].replace(/[ ]/g, "");
		if (browser == "Microsoft Internet Explorer"
				&& trim_Version == "MSIE8.0") {
            //如果是ie8
            $('#list table').css('border-top','1px solid black');
            $('#list table').css('border-left','1px solid black');
		}
		
		
		
		
	</script>
	<script src="js/supervise_detail.jsp.js"></script>
</body>
</html>